﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
	<link href="js-console.css" rel="stylesheet" />
	<!--4. Write an expression that checks for given integer if 
			its third digit (right-to-left) is 7. E. g. 1732 = true.-->
</head>
<body>
	<div id="js-console"></div>
	<script src="js-console.js"></script>
	<script>
		var input = prompt("Enter integer value");

		if (!isNaN(input)) {
			if (input > 99) {
				var result = input % 1000;
				result /= 100;
				result  = Math.floor(result);
				jsConsole.writeLine("The third digit is 7 = " + (result == 7))
			}
			else {
				jsConsole.writeLine("The number do not have third digit.");
			}
		}
		else {
			jsConsole.writeLine("Not a Number.");
		}

	</script>
</body>
</html>
